﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AddNewSlide.ascx.cs" Inherits="NLLSite.Administrator.UserControl.AddNewSlide" %>
<style type="text/css">
    .style1
    {
        width: 383px;
    }
    .style2
    {
        width: 150px;
    }
</style>
<script type="text/javascript" src="../../ckfinder/ckfinder.js"></script>
<script type="text/javascript">

    function BrowseServer() {
        var finder = new CKFinder();
        finder.basePath = '../../ckfinder/'; 
        finder.selectActionFunction = SetFileField;
        finder.popup();
    }
    function SetFileField(fileUrl) {
        document.getElementById('ctl00_ContentPlaceHolderCenter_AddNewSlide1_Txtimgslide').value = fileUrl;
        //Element ID = Ten class usercontrol + 1 + ID cua text box. ctl00_ContentPlaceHolderCenter_


    }

</script>
<script type="text/javascript">

    function BrowseServer1() {
        
        var finder = new CKFinder();
        finder.basePath = '../../ckfinder/'; 
        finder.selectActionFunction = SetFileField1;
        finder.popup();
    }

    function SetFileField1(fileUrl) {
        document.getElementById('ctl00_ContentPlaceHolderCenter_AddNewSlide1_TxtimgThb').value = fileUrl;
    }

</script>
<div class="box box-100">
    <div class="boxin">
        <div class="header">
            <h3>
                Thêm mới Ebook</h3>
        </div>
        <div style="padding: 18px;">
            <!--<form class="basic" action="" method="post" enctype="multipart/form-data"><!-- Default basic forms -->
            <div class="inner-form">
    <table style="width:100%;">
        <tr>
            <td class="style2">
                Ảnh Trên Slide :</td>
            <td class="style1">
                <asp:TextBox ID="Txtimgslide" runat="server" Width="250px"></asp:TextBox>
&nbsp;<input type="button" value="Browse" onclick="BrowseServer();" 
                                style="width: 96px" class="altbutton" id="btn1" /></td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="Txtimgslide" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Ảnh Tiêu Đề :</td>
            <td class="style1">
                <asp:TextBox ID="TxtimgThb" runat="server" Width="250px"></asp:TextBox>
&nbsp;<input type="button" value="Browse" onclick="BrowseServer1();" 
                                style="width: 96px" class="altbutton" id="btn2" /></td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="TxtimgThb" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Mô Tả :</td>
            <td class="style1">
                <asp:TextBox ID="Txtdes" runat="server" Height="71px" TextMode="MultiLine" 
                    Width="250px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="Txtdes" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Đường Dẫn :</td>
            <td class="style1">
                <asp:TextBox ID="Txtlink" runat="server" Width="250px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="Txtlink" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Tình Trạng :</td>
            <td class="style1">
                <asp:CheckBox ID="Cbxsta" runat="server" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="lblchk" runat="server"></asp:Label>
            </td>
            <td class="style1">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td class="style1">
                <asp:Button ID="Button3" runat="server" onclick="Button3_Click" 
                    Text="Thêm Mới" />
&nbsp;
                <asp:Button ID="Button4" runat="server" onclick="Button4_Click" 
                    Text="Thiết Lập Lại" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</div>
</div></div>

